using System.Web.Mvc;
using JaxDug.ViewModels;
using System.Collections.Generic;
using System.Linq;
using System;
using JaxDug.Models;
namespace JaxDug.Mvc4.Controllers
{
    public partial class SponsorController : Controller
    {
        private static Random rnd = new Random();


        //public SponsorController()
        //{
        //    _sponsorRepo = new SponsorRepository();
        //}
        [AllowAnonymous]

        public virtual ActionResult Index()
        {
            var sponsors = new List<Sponsor>()
                               {
                                   new Sponsor(){ Image=Links.Images.Sponsors.adobe_png, Name="Adobe", Link="http://www.adobe.com/" },
                                   new Sponsor(){ Image=Links.Images.Sponsors.experis_png, Name="Experis", Link="http://www.experis.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.intertech_png,Name="Intertech", Link="http://www.intertech.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.jetbrains_png,Name="JetBrains", Link="http://www.jetbrains.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.lps_png, Name="LPS", Link="http://www.lpsvcs.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.oreilly_png, Name="O'Reilly", Link="http://www.oreilly.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.pcg_png, Name="feature[23]", Link="http://www.feature23.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.pluralsight_png, Name="Pluralsight", Link="http://www.pluralsight.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.pragmatic_works_png, Name="Pragmatic Works", Link="http://www.pragmaticworks.com/"},
                                   new Sponsor(){ Image=Links.Images.Sponsors.qualitydata_png, Name="Quality Data", Link="http://www.qualitydata.com/"},
                               };

            return View(new SponsorListViewModel
            {
                Title = "Sponsors",
                SponsorList = sponsors//sponsors.OrderBy(s=>rnd.Next()).ToList() // _sponsorRepo.ListAllSponsors()
            });
        }

      
    }
}